package com.payment.system.service.impl;

import java.util.List;

import com.payment.common.support.Convert;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.payment.system.mapper.MerchantUpgradeMapper;
import com.payment.system.domain.MerchantUpgrade;
import com.payment.system.service.IMerchantUpgradeService;

/**
 * 商户升级 服务层实现
 * 
 * @author payment
 * @date 2019-06-10
 */
@Service
public class MerchantUpgradeServiceImpl implements IMerchantUpgradeService 
{
	@Autowired
	private MerchantUpgradeMapper merchantUpgradeMapper;

	/**
     * 查询商户升级信息
     * 
     * @param id 商户升级ID
     * @return 商户升级信息
     */
    @Override
	public MerchantUpgrade selectMerchantUpgradeById(String id)
	{
	    return merchantUpgradeMapper.selectMerchantUpgradeById(id);
	}
	
	/**
     * 查询商户升级列表
     * 
     * @param merchantUpgrade 商户升级信息
     * @return 商户升级集合
     */
	@Override
	public List<MerchantUpgrade> selectMerchantUpgradeList(MerchantUpgrade merchantUpgrade)
	{
	    return merchantUpgradeMapper.selectMerchantUpgradeList(merchantUpgrade);
	}
	
    /**
     * 新增商户升级
     * 
     * @param merchantUpgrade 商户升级信息
     * @return 结果
     */
	@Override
	public int insertMerchantUpgrade(MerchantUpgrade merchantUpgrade)
	{
	    return merchantUpgradeMapper.insertMerchantUpgrade(merchantUpgrade);
	}
	
	/**
     * 修改商户升级
     * 
     * @param merchantUpgrade 商户升级信息
     * @return 结果
     */
	@Override
	public int updateMerchantUpgrade(MerchantUpgrade merchantUpgrade)
	{
	    return merchantUpgradeMapper.updateMerchantUpgrade(merchantUpgrade);
	}

	/**
     * 删除商户升级对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteMerchantUpgradeByIds(String ids)
	{
		return merchantUpgradeMapper.deleteMerchantUpgradeByIds(Convert.toStrArray(ids));
	}
	
}
